package com.tricode.ile.training.task.one.calculatesumofelementsinarray;

public class CalculateSumFromArray {

	/**
	 * calculates the sum from all elements given in the array
	 * 
	 * @param list
	 * @return the sum of the elements
	 */

	int getSum(int[] list) {
		int sum = 0;
		for (int i : list) {
			sum += i;
		}
		return sum;
	}

}
